﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using myBoard.App.Model;
using myBoard.App.Components.MagnetsStore.ViewsModels;

namespace myBoard.App.Components.MagnetsStore.Commands
{
    public class SelectMagnetCommand : ICommand
    {
        #region ICommand Members

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            MagnetViewModel mvm = parameter as MagnetViewModel;
            Instances instances = new Instances();
            instances.MagnetsViewModel.SelectedMagnet = mvm;
        }

        #endregion
    }
}
